package com.ewanghuiju.app.util.json;

import com.ewanghuiju.app.util.LogUtil;
import com.ke.gson.sdk.ReaderTools;

/**
 * Created by tangfuling on 2018/11/1.
 */

public class MyGsonSyntaxErrorListener {

    public static void start() {
        ReaderTools.setListener(mListener);
    }

    private static ReaderTools.JsonSyntaxErrorListener mListener = new ReaderTools.JsonSyntaxErrorListener() {
        @Override
        public void onJsonSyntaxError(String exception, String invokeStack) {
            //upload error info to server
            LogUtil.e("json syntax exception: " + exception);
            LogUtil.e("json syntax invokeStack: " + invokeStack);
        }
    };
}
